<?php

class Benservi_Forms_Cliente extends Zend_Form{

    public function init()
    {
        $id = new Zend_Form_Element_Hidden('id');        

        $nome = new Zend_Form_Element_Text('nome');
        $nome->setLabel('Nome')
             ->setRequired(true)
             ->addValidator('EmailAddress')
             ->setOptions(array('class' => 'input-gg'));

        $idade = new Zend_Form_Element_Text('idade');
        $idade->setLabel('Idade')
             ->setRequired(true);

        $pai = new Zend_Form_Element_Text('pai');
        $pai->setLabel('Pai')
            ->setRequired(true);

        $mae = new Zend_Form_Element_Text('mae');
        $mae->setLabel('Mae')
            ->setRequired(true);

        $act = new Zend_Form_Element_Button('Salvar');

        $act->setAttribs(
                array(
                    'class' =>  'positive',
                    'type'  =>  'submit'
                )
            )
            ->setDescription( sprintf('<button name="act" id="act" type="reset" class="positive">Reset</button>', Zend_Controller_Front::getInstance()->getBaseUrl()))
            ->setDecorators(array(
                'ViewHelper',
                array('Description', array('escape' => false, 'tag' => false)),
                array('HtmlTag', array('tag' => 'dt', 'class' => 'buttons')),
        ));

        $this->addElements(array($id, $nome, $idade, $pai, $mae, $act));
       
    }

}

?>
